﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Meqs.Entity;
using Meqs.Logic.Interface;

public partial class Base_School_StaffList : ContainerBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    /// <summary>
    /// 获取教研组信息
    /// </summary>
    [System.Web.Services.WebMethod]
    public static List<GlobalCauseInfo> InitCauseList()
    {
        IGlobalCauseInfoLogic causeLogic = Container<IGlobalCauseInfoLogic>.Instance;
        List<GlobalCauseInfo> causeList = (List<GlobalCauseInfo>)causeLogic.SelectSchoolCause(Common.GetConstSchoolMark(), 1);

        return causeList;
    }

    /// <summary>
    /// 获取年级组信息
    /// </summary>
    [System.Web.Services.WebMethod]
    public static int GetGradeInfo()
    {
        Hashtable ht = new Hashtable();
        ht.Add("SchoolMark", SchoolMark);
        IList<SchoolInfo> schoolList = Container<ISchoolInfoLogic>.Instance.FindAll(ht);
        if(schoolList == null || schoolList.Count < 1)
            return 0;
        else 
            return schoolList[0].SchoolOpt;
    }

    /// <summary>
    /// 获取其他职务信息
    /// </summary>
    /// <returns></returns>
    [System.Web.Services.WebMethod]
    public static IList<SecurityRole> GetStaffInfo()
    {
        Hashtable ht = new Hashtable();
        ht.Add("SchoolMark", SchoolMark);
        IList<SecurityRole> roleList = Container<ISecurityRoleLogic>.Instance.FindAll(ht);
        return roleList;
    }
}
